package com.hrt.datasender.datadao.model;

import java.util.Date;

import com.btcode.db.fieldtype.FieldType;
import com.btcode.orm.model.BaseModel;
import com.btcode.orm.model.Field;
import com.btcode.orm.model.IField;

public class BdSendRecordModel extends BaseModel {

    private static final long serialVersionUID = 1L;

    private static String tableName = "BD_SEND_RECORD";

    public static IField id = new Field(BdSendRecordModel.class, "ID", FieldType.String, true);

    public static IField ip = new Field(BdSendRecordModel.class, "IP", FieldType.String, false);

    public static IField port = new Field(BdSendRecordModel.class, "PORT", FieldType.String, false);

    public static IField dataType = new Field(BdSendRecordModel.class, "DATA_TYPE", FieldType.String, false);

    public static IField dataReadtime = new Field(BdSendRecordModel.class, "DATA_READTIME", FieldType.DateTime, false);

    public static IField dataReadtimeText = new Field(BdSendRecordModel.class, "DATA_READTIME_TEXT", FieldType.String,
            false);

    public void setId(String value) {
        setFieldValue(id.getFieldName(), value);
    }

    public String getId() {
        Object value = getFieldValue(BdSendRecordModel.id.getFieldName());
        String result = getValueConver().converToString(value);
        return result;
    }

    public void setIp(String value) {
        setFieldValue(ip.getFieldName(), value);
    }

    public String getIp() {
        Object value = getFieldValue(BdSendRecordModel.ip.getFieldName());
        String result = getValueConver().converToString(value);
        return result;
    }

    public void setPort(String value) {
        setFieldValue(port.getFieldName(), value);
    }

    public String getPort() {
        Object value = getFieldValue(BdSendRecordModel.port.getFieldName());
        String result = getValueConver().converToString(value);
        return result;
    }

    public void setDataType(String value) {
        setFieldValue(dataType.getFieldName(), value);
    }

    public String getDataType() {
        Object value = getFieldValue(BdSendRecordModel.dataType.getFieldName());
        String result = getValueConver().converToString(value);
        return result;
    }

    public void setDataReadtime(Date value) {
        setFieldValue(dataReadtime.getFieldName(), value);
    }

    public Date getDataReadtime() {
        Object value = getFieldValue(BdSendRecordModel.dataReadtime.getFieldName());
        Date result = getValueConver().converToDate(value);
        return result;
    }

    public void setDataReadtimeText(String value) {
        setFieldValue(dataReadtimeText.getFieldName(), value);
    }

    public String getDataReadtimeText() {
        Object value = getFieldValue(BdSendRecordModel.dataReadtimeText.getFieldName());
        String result = getValueConver().converToString(value);
        return result;
    }

    public String getTableName() {
        return tableName;
    }

    public boolean isNeedCache() {
        return false;
    }

}